classes
enum classes
functions
header
<system_error>
System errors
This header defines a series of standardized elements to report error conditions originating from the operating system or other low-level operations.
Most such errors are identified by a single integer value, which is sometimes system-specific. The class error_code encapsulates and preserves these system-generated values associating them with an error_category.
These objects can be compared against objects of type error_condition, which is a very similar type meant to represent the same errors, but in a portable way. In this way, library calls to the system may produce error_code values (which preserve system-specific values), and programs can compare them against error_condition objects (which are portable between systems).
error_category objects identify different sets of error codes and also determine the correspondences between error codes and error conditions.
This header defines two categories: generic_category and a system_category. Other libraries may define additional error categories (such as the standard iostream_category, defined in <ios>
).
The class system_error is a standard exception type that carries an error_code object.